home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
0361
/
moonlist.frm
< prev
next >
Wrap
Text File
|
1997-03-31
|
3KB
|
97 lines
VERSION 2.00
Begin Form MoonList
BackColor = &H00C0C0C0&
Caption = "Moon Phases"
ControlBox = 0 'False
Height = 2070
Left = 3135
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1635
ScaleWidth = 4380
Top = 2820
Width = 4530
Begin CommandButton Command1
Caption = "OK"
Default = -1 'True
Height = 330
Left = 1590
TabIndex = 0
Top = 1020
Width = 1170
End
Begin XListBox XList1
Height = 1005
ItemDefHeight = 100
ItemInvert = 0 'False
Left = 0
Top = 0
Width = 4365
End
End
Option Explicit
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Sub Command1_Click ()
Unload Me
End Sub
Sub Form_Load ()
Dim OurDate As Variant
Dim Yr As Integer
Dim I As Integer
Dim T As Long
Dim Sel As Integer
If gSettingsVisible Then
MoonList.Left = Settings.Left + (Settings.Width / 2) - (MoonList.Width / 2)
MoonList.Top = Settings.Top + (Settings.Height / 2) - (MoonList.Height / 2)
Else
MoonList.Left = Screen.Width / 2 - (MoonList.Width / 2)
MoonList.Top = Screen.Height / 2 - (MoonList.Height / 2)
End If
Screen.MousePointer = 11
OurDate = Date
Yr = Year(OurDate)
gMoons = 0
For I% = 1 To 12
Call CalcMoonPhases(Yr, I%, 1, 0, True)
Next I%
Xlist1.ItemDefHeight = AlltheTime.MoonPic.Height
For I = 1 To gMoons
Xlist1.AddItem gMoonList$(I) + " - " + MoonDescArr$(gMoonSubs(I) - 35)
Xlist1.ItemImage(I - 1) = AlltheTime.MoonSun.GraphicCell(gMoonSubs(I))
'Xlist1.ItemBackColor(I - 1) = Backcolor
'Xlist1.FontBold(I - 1) = False
If DateValue(gMoonList$(I)) <= DateValue(SavedDat$) Then
Sel = I - 1
'Xlist1.ListIndex = I
End If
Next I
'Show
T& = SendMessage(Xlist1.hWnd, LB_SETCURSEL, Sel, 0&)
T& = SendMessage(Xlist1.hWnd, LB_SETTOPINDEX, Sel, 0&)
Screen.MousePointer = 0
End Sub
Sub Form_Resize ()
Dim Items As Integer
If Height < Command1.Height * 6.4 Then Height = Command1.Height * 6.4
If Width < Command1.Width * 2 Then Width = Command1.Width * 2
Xlist1.Width = ScaleWidth
Command1.Left = (ScaleWidth - Command1.Width) / 2
Command1.Top = (ScaleHeight - Command1.Height * 1.5)
Xlist1.Height = Command1.Top - Command1.Height / 2
Items = Xlist1.Height \ Xlist1.ItemDefHeight
Xlist1.Height = Items * Xlist1.ItemDefHeight + 30
'Command1.Top = (ScaleHeight - Command1.Height * 1.5)
End Sub
Sub XList1_Click ()
'
End Sub